home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Panorama / Panorama - Disk 19D (1987-07-22)(Pacific North-West Amigas Club)[WB].zip / Panorama - Disk 19D (1987-07-22)(Pacific North-West Amigas Club)[WB].adf / PipeHandler1.2 / prelude.asm < prev    next >
Assembly Source File  |  1987-06-28  |  704b  |  38 lines

  1. ; prelude.asm
  2.  
  3.  
  4.         XREF    _handler
  5.  
  6.  
  7. StartModule:    DC.L    (EndModule-StartModule+3)/4    ; for BCPL linking
  8.  
  9. EntryPoint:    LEA    SPsave(PC),A0
  10.         MOVE.L    SP,(A0)            ; save initial SP
  11.  
  12.         LSL.L    #2,D1            ; convert to byte pointer
  13.         MOVE.L    D1,-(SP)        ; startup packet pointer
  14.  
  15. ; --- Now, call the loaded handler code.
  16. ; --- It is sent the byte address of the startup packet, to which
  17. ; --- it should reply.
  18.  
  19.         JSR    _handler        ; call handler code
  20.  
  21.         MOVEA.L    SPsave(PC),SP        ; restore SP
  22.         RTS
  23.  
  24.  
  25. SPsave:        DC.L    0
  26.  
  27.  
  28. ;    trailing definitions for BCPL linking
  29.  
  30.         CNOP    0,4            ; align to lonword boundary
  31.  
  32.         DC.L    0            ; End Marker
  33.         DC.L    1            ; Global 1
  34.         DC.L    EntryPoint-StartModule    ; Offset
  35.         DC.L    1            ; Highest Global Used
  36.  
  37. EndModule:    END
  38.